﻿using BUGCOME.Model.Auth;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BUGCOME.ServiceCore.Services.IServices
{
    /// <summary>
    /// 角色菜单服务接口，定义角色与菜单关联的相关操作
    /// </summary>
    public interface IRoleMenuService : IBaseService<RoleMenu>
    {
        /// <summary>
        ///异步批量添加角色菜单关联
        /// </summary>
        /// <param name="roleMenus">
        /// 角色菜单关联列表</param>
        /// <returns>受影响的行数</returns>
        Task<long> AddRoleMenuAsync(List<RoleMenu> roleMenus);

        /// <summary>
        /// 检查指定菜单是否已被角色关联
        /// </summary>
        /// <param name="menuId">菜单 ID</param>
        /// <returns>存在关联返回 true，否则返回 false</returns>
        Task<bool> CheckMenuExistRoleAsync(long menuId);
    }
}
